package com.qingcheng.service.goods;
import com.qingcheng.entity.PageResult;
import com.qingcheng.pojo.goods.Sku;

import java.io.IOException;
import java.util.*;

/**
 * sku业务逻辑层
 */
public interface SkuService {


    public List<Sku> findAll();


    public PageResult<Sku> findPage(int page, int size);


    public List<Sku> findList(Map<String,Object> searchMap);


    public PageResult<Sku> findPage(Map<String,Object> searchMap,int page, int size);


    public Sku findById(String id);

    public void add(Sku sku);


    public void update(Sku sku);


    public void delete(String id);

    //保存全部价格到缓存
    public void saveAllPriceToRedis();

    //查询价格缓存
    public Integer findPrice(String id);

    //更新价格到缓存
    public void savePriceToRedisById(String id,Integer price);

    //删除价格缓存
    public void delePriceFromRedis(String id);

    //批量导入
    public boolean importAll() throws IOException;
}
